Shader "Phalanx/Matrix/WorldPositionToScreenPosExample1"
{
    Properties
    {
        _MainTex("Texture", 2D) = "white" { } 
    }
    SubShader
    { 
        Pass
        {
            Cull Back
            
            CGPROGRAM
            #pragma shader_feature _ _USE_DEBUG_MVP_MATRIX

            #pragma vertex vert
            #pragma fragment frag
            
            #include "UnityCG.cginc"
            
            sampler2D _MainTex;
            float4x4 DEBUG_MATRIX_MVP;
            
            struct v2f
            {
                float4 positionCS : SV_POSITION;
                float2 uv : TEXCOORD0;
            };
            
            v2f vert(appdata_base v)
            {
                v2f o;
                o.uv = v.texcoord.xy;

                #ifdef _USE_DEBUG_MVP_MATRIX
                    // my debug MVP_MATRIX
                    o.positionCS = mul(DEBUG_MATRIX_MVP, v.vertex);
                #else
                    // the standard UNITY_MATRIX_MVP matrix
                    // mul(UNITY_MATRIX_MVP,*)
                    o.positionCS = UnityObjectToClipPos(v.vertex);
                #endif
                
                return o;
            }
            
            half4 frag(v2f i) : COLOR
            {
                return tex2D(_MainTex, i.uv);
            }
            ENDCG
        }
    }
} 